import React, { Component, Fragment } from 'react';
import classNames from 'classnames';
import { connect } from 'dva';
import Bind from 'lodash-decorators/bind';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import FormBaiscWrap from "./components/FormBaisc"
import FormProductWrap from "./components/FormProduct"
import FormLogisticsWrap from "./components/FormLogistics"
import EditorProduct from "./components/EditorProduct"
import { Button, Steps } from 'antd';
import styles from './ListStep.less';


@connect(({ product, loading }) => ({ product, submiting: null })

)
class ProductListStep extends Component {
    constructor(props,context){
        super(props,context);
        this.state={
            unEditor:true
        }
        this.tabFn = this.tabFn.bind(this)
    }
    handleClick() {
        console.log('click');
        this.props.dispatch({
            type:'product/saveProduct'
        })
    }
    tabFn(unEditor){
        console.log(unEditor)
        this.setState({unEditor:unEditor})
    }
    render() {
        const {unEditor} = this.state;
        return (<PageHeaderWrapper>
                {/* <div className={styles.addxuanze}>
                    <div className={!unEditor?styles.info:classNames(styles.info, styles.active)}  onClick={()=>{this.tabFn(true)}}><span>1</span> <span>填写商品信息</span></div> 
                    <div className={!unEditor?classNames(styles.info, styles.active):styles.info} onClick={()=>{this.tabFn(false)}}><span>2</span> <span>编辑商品详情</span></div>
                </div> */}
                {
                    // unEditor?
                    <div>
                        <FormBaiscWrap/>
                        <FormProductWrap/>
                        <FormLogisticsWrap/>
                        {/* <EditorProduct/> */}
                    </div>
                    // :
                    // <EditorProduct/>

                }


          </PageHeaderWrapper>)
    }
}

export default ProductListStep;